<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.tjsinfo.tjsoa.common.ToolKit"%>
<%@page import="com.tjsinfo.tjsoa.documentationflow.xingzhengshouwen.vo.TXingzhengshouwenNeirong"%>


<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
Date nowDate = new Date();
String deptName = (String)request.getAttribute("deptName");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
  	<meta http-equiv="x-ua-compatible" content="ie=7" />
    <base href="<%=basePath%>"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登记</title>

<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" />  
<link href="<%=basePath%>style/shoufatable.css" rel="stylesheet" type="text/css" /> 
	<link href="<%=basePath %>ajaxFramework/ext-2.1/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/ext-all-debug.js"></script>
    <script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/source/locale/ext-lang-zh_CN.js"></script>
    <script type="text/javascript" src="<%=basePath %>ajaxFramework/jQuery/jquery.js"></script>
    <script type="text/javascript" src="<%=basePath %>js/common/system/selectusercheck.js"></script>
    <script type="text/javascript" src="<%=basePath %>js/common/system/selectuserradio.js"></script>
    <script type="text/javascript" src="<%=basePath %>documentationflow/xingzhengshouwen/js/comboBox.js"></script>
    <script type="text/javascript" src="<%=basePath %>js/common/global/validator.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/global/pageControl.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/fileUpload/ajaxfileupload.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/fileUpload/ajaxFileZx.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/common/system/selectuserdutyradio.js"></script>
      <script type="text/javascript">
		function init(){
			new Ext.form.DateField ({
				format:'Y-m-d',   
		        applyTo:'fawenriqi',   
		        readOnly:true,   
		        emptyText:'请选择发文日期',
				width:150
		    });
		    change(3);
		}
		$(function(){
			$("#gwlz_title a").get(0).href="javascript:change(1)";
			$("#gwlz_title a").get(1).href="javascript:change(2)";
			
		});
		
		function change(start){
			 if(start == 1)
			{
				$("#li2").addClass("over");
				$("#li3").removeClass();
				$("#span2").show();
				$("#span3").hide();
			
			}
			else if(start == 2)
			{
				$("#li3").addClass("over");
				$("#li2").removeClass();
				$("#span3").show();
				$("#span2").hide();
				
			}
			
		}
		function f_submit(){
			if(isnull("input[name='title']","请填写标题")
				&&isnull("input[name='wenhao']","请填写文号")
				&&isnull("input[name='fawenriqi']","请填写发文日期")
				&&isnull("input[name='danwei']","请填写发文单位")
				&&isnull("input[name='bumen']","请填写上传部门"))
			{
				Ext.MessageBox.show({
			           title:'消息',
			           msg: '是否执行此操作?',
			           buttons: Ext.MessageBox.YESNO,
			           fn: function(btn){
			           	  if(btn == 'yes'){
			           		$("input[name='bumen']").removeAttr("disabled");
			           	  	msg();
							document.form1.submit();
			           	  }	
			           },
			           icon: Ext.MessageBox.QUESTION
			  	});
				
			}
		}
		

	</script>
	
	
				<!-- 执行上传文件操作的函数 -->
<script type="text/javascript">
var deleteFile;
var alreadyUploadFile='';
var uploadUrl='<%=basePath %>tjsinfo/tjsoa/system/ajaxFileUpload.do?method=uploader';
var deteleFileUrl='<%=basePath %>tjsinfo/tjsoa/system/ajaxFileUpload.do?method=deleted';
</script>	
  </head>
  <body onload="init()">
  	<form action="<%=basePath %>tjsinfo/tjsoa/articles/Rules.do?method=addRules" method="post" name="form1" enctype="multipart/form-data">
  	 <div id="files" style="display: none;"></div>
   <div id="rightindex" style="height: 97%">
   <div id="tabtj"> 
      <!--导航开始处-->
      <div id="ttt">
        <div id="gwlz_title">
            <ul>
                <li class="over" id="li2"><a href="#"><span>附件</span></a></li>
                <li  id="li3"><a href="#"><span>办理</span></a></li>
            </ul>
            <div style="text-align: right;padding-right: 10px"><a href="javascript:history.go(-1)"><img src="<%=basePath %>images/fanhui111.gif"/></a></div>
        </div>
        <div style="overflow-x:hidden;overflow-y:auto; height:93%">
        
       
        <div class="swcbdtab" id="span2">
        	<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:80px">
              <tr>
                <td align="center">
                    <table width="564" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><img src="images/tjfj01.gif" /></td>
                      </tr>
                      <tr >
                        <td><div class="tjfjcontent" style="padding-bottom: 10px">
                                <table width="90%" height="90%" border="0" cellspacing="0" cellpadding="0" class="researchtab">
                                	<tr align="center">
	                                  <td>
	                                  	<div class="sc_listLong">
	                                  		<ul id="uploadList"></ul>
	                                  	</div>
	                				  	<span>
	                				  		规章制度：<input  type="file" id="file_0" name="file[0]" size="34" class="textinput" /><br/>
	                				  		相关表格：<input  type="file" id="file_1" name="file[1]" size="34" class="textinput" />
	                				  	</span>
	                				  </td>
                					</tr>        				         
                                </table>
                            </div></td>
                      </tr>
                      <tr>
                        <td><img src="images/tjfj03.gif" /></td>
                      </tr>
                    </table>
                    
                </td>
              </tr>
          </table>
        	
        	
        </div>
        <div class="swcbdtab"  id="span3" style="display: none;">
        	<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:30px">
              <tr>
                <td align="center">
                    <table width="564" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td><img src="images/bl01.gif" /></td>
                      </tr>
                      <tr>
                        <td><div class="blcontent" style="padding-bottom: 10px">
                                <table width="90%" height="100%" border="0" cellspacing="0" cellpadding="0" class="researchtab">
                        		 <tr>
                                    <td width="30%" align="right">标题：</td>
                                    <td colspan="2" align="left"> 
                        		  		<input name="title" id="title" type="text" size="60" maxlength="150"/>
                        		    </td>
                                  </tr>
                        		  <tr>
                                    <td width="30%" align="right">文号：</td>
                                    <td colspan="2" align="left">
                        		  		<input name="wenhao" id="wenhao" type="text" size="60" maxlength="50"/>
                                    </td>
                                  </tr>
                                  <tr>
                                    <td width="30%" align="right">发文日期：</td>
                                    <td colspan="2" align="left">
                                      <input name="fawenriqi" id="fawenriqi" value="<%=ToolKit.FormatDate(nowDate) %>" type="text" size="60" maxlength="50"/>
                                    </td>
                                  </tr>
                                  <tr>
                                    <td width="30%" align="right">发文单位：</td>
                                    <td colspan="2" align="left">
                                      <input name="danwei" id="danwei" type="text" size="60" maxlength="50"/>
                                    </td>
                                  </tr>
                                  <tr>
                                     <td width="30%" align="right">上传部门：</td>
                                    <td colspan="2" align="left">
                                      <input name="bumen" id="bumen" type="text" size="60" maxlength="50" value="<%=deptName%>" disabled="disabled" />
                                    </td>
                                  </tr>                             
                                  
                                
                               	 
                                
                                  <tr align="center">
                                    <td colspan="3" height="50"><a href="javascript:f_submit()"><img src="images/an_tj.gif" /></a>&nbsp;
                                       <a href="javascript:history.go(-1)"><img src="images/qx.gif" /></a>
                                    </td>
                                   </tr>
                                </table>
                            </div></td>
                      </tr>
                      <tr>
                        <td><img src="images/bl03.gif" /></td>
                      </tr>
                    </table>
                </td>
              </tr>
          </table>
        </div>
   	  </div>
   	  </div> 
   </div>
</div>
	  <input id="basePath" value="<%=basePath%>" type="hidden"/>
   	  <input id="node" value="" type="hidden"/>
</form>
	
</body>
   
</html>
